package com.haste.common.domain.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @author haste
 * 所有实体的父类
 */
@Data
public class BasePo {
    //1禁用，2启用
    @TableField(value = "disabled",fill = FieldFill.INSERT)
    private Integer disabled;

    @TableField(value = "sort",fill = FieldFill.INSERT)
    private Integer sort;

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;

    @TableField(value = "operator",fill = FieldFill.INSERT_UPDATE)
    private String operator;
}
